//
//  UIImageView+OMTImagePicker.h
//  OMTImagePicker
//
//  Created by yizhaorong on 2017/11/15.
//

#import <UIKit/UIKit.h>
#import "OMTAlbum.h"

@interface UIImageView (OMTAsset)
// 具体图片资源
@property (nonatomic, strong) OMTAsset *omt_asset;
// 相册
@property (nonatomic, strong) OMTAlbum *omt_album;
// 请求ID
@property (nonatomic, assign) NSInteger requestId;

/**
 设置相册图片

 @param asset 相册
 */
- (void)omt_setImageWithAsset:(OMTAsset *)asset;

/**
 设置相册图片

 @param asset 相册
 @param placeholder 占位图
 */
- (void)omt_setImageWithAsset:(OMTAsset *)asset placeholderImage:(UIImage *)placeholder;

/**
 设置相册图片
 
 @param asset 相册
 @param placeholder 占位图
 @param completion 成功回调
 */
- (void)omt_setImageWithAsset:(OMTAsset *)asset
             placeholderImage:(UIImage *)placeholder
                   completion:(void (^)(UIImage *image, OMTAsset *asset))completion;

/**
 设置相册封面

 @param album 相册
 */
- (void)omt_setImageWithAlbum:(OMTAlbum *)album;


/**
 设置相册封面

 @param album 相册
 @param placeholder 占位图
 */
- (void)omt_setImageWithAlbum:(OMTAlbum *)album placeholderImage:(UIImage *)placeholder;

@end
